use "d:/Users/Andrey/Dropbox/data/fcpa/replication/firm level final.dta", clear
cd d:/Users/Andrey/Dropbox/data/fcpa/replication

log using firmlevelapp, text replace

*** Table A3 ***

reg lsanction lbribe lemployees  firmhomeUShome firmhomeUShost lgdppchome lgdppchost tradehost wbcorhost usfirm polityhome polityhost count lusfdi lrents i.year , robust cluster(sname)
		estimates store m11

reg lsanction lbribe lemployees allyUShome allyUShost lgdppchome lgdppchost tradehost wbcorhost usfirm    polityhome polityhost  count lusfdi lrents i.year , robust  cluster(sname)
		estimates store m12		

reg lsanction lbribe lemployees  leconaidUShome leconaidUShost lgdppchome lgdppchost tradehost wbcorhost  usfirm  polityhome polityhost  count lusfdi lrents i.year , robust cluster(sname)
		estimates store m13
		
reg lsanction lbribe lemployees lmilaidUShome lmilaidUShost lgdppchome lgdppchost tradehost wbcorhost usfirm   polityhome polityhost  count  lusfdi lrents i.year , robust cluster(sname)
		estimates store m14

reg lsanction lbribe lemployees  armsUShome armsUShost lgdppchome lgdppchost tradehost wbcorhost usfirm  polityhome polityhost  count lusfdi lrents i.year, robust cluster(sname)
		estimates store m15
		
mi set flong
mi xtset, clear
mi stset, clear


mi register imputed lbribe lemployees 

mi impute chain (truncreg,ll(0)) lbribe lemployees = lgdppchome lgdppchost tradehome tradehost count i.year i.sectorid usfirm lsanction polityhost  wbcorhome wbcorhost lrents, add(20) force rseed(1562)	
		
*** Table A4 ***		
		
mi estimate, post: reg lsanction lbribe lemployees firmhomeUShome firmhomeUShost lgdppchome lgdppchost tradehost wbcorhost usfirm   polityhome polityhost   lusfdi lrents count i.year, robust  cluster(sname)
		estimates store m16

mi estimate, post: reg lsanction lbribe lemployees allyUShome allyUShost lgdppchome lgdppchost tradehost wbcorhost  usfirm polityhome polityhost   lusfdi lrents count i.year, robust  cluster(sname)
		estimates store m17

mi estimate, post: reg lsanction lbribe lemployees leconaidUShome leconaidUShost lgdppchome lgdppchost tradehost wbcorhost usfirm polityhome polityhost   lusfdi lrents count i.year , robust  cluster(sname)
		estimates store m18

mi estimate, post: reg lsanction lbribe lemployees lmilaidUShome lmilaidUShost lgdppchome lgdppchost tradehost wbcorhost usfirm  polityhost  polityhome  lusfdi lrents count i.year , robust  cluster(sname)
		estimates store m19

mi estimate, post: reg lsanction lbribe lemployees armsUShome armsUShost lgdppchome lgdppchost tradehost wbcorhost usfirm polityhome polityhost  lusfdi lrents count i.year, robust  cluster(sname)
		estimates store m20
		
log close